using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Collections.Generic;
using System.Collections;

using J2ME.RMS;
using Nextel.Utils;

namespace Java.binario.bean
{

    public class GeneralBean : Persistente
    {
        public static String GENERAL_ENTREGA = "1";
        public static String GENERAL_MOTIVO = "2";
        public static String GENERAL_META = "3";
        //--------------------------------
        public static String ATRIBUTO_META_VITA = "4";
        public static String ATRIBUTO_META_ACTIVIDAD = "6";

        public String grupo;
        public String codigo;
        public String descripcion;
        public String valor;

        public override void persistir(DataOutputStream dataOutput, List<Persistente> list)
        {
            dataOutput.writeInt(list.Count);

            for (int i = 0; i < list.Count; i++)
            {
                GeneralBean bean = (GeneralBean)list[i];
                bean.persistirItem(dataOutput);
            }
        }


        public void persistirItem(DataOutputStream dataOutput)
        {
            dataOutput.writeString(StringUtils.stringNullToBlank(grupo));
            dataOutput.writeString(StringUtils.stringNullToBlank(codigo));
            dataOutput.writeString(StringUtils.stringNullToBlank(descripcion));
            dataOutput.writeString(StringUtils.stringNullToBlank(valor));
        }
    }
}
